<%--
  Created by IntelliJ IDEA.
  User: 86175
  Date: 2023/5/16
  Time: 16:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script>
        var inputs = document.getElementsByTagName("input")
        window.onload = function () {
            for (var i = 0; i < inputs.length; i++) {
                if (localStorage.getItem(inputs[i].name) !== null) {
                    inputs[i].value = localStorage.getItem(inputs[i].name)
                }
            }
        }

        function setLocalStorage() {
            for (var i = 0; i < inputs.length; i++) {
                localStorage.setItem(inputs[i].name, inputs[i].value)
            }
        }
    </script>
</head>
<body>

<form method="post" action="ConnectionServlet">
    <div>
        <div>
            <div>
                <input type="text" name="url" value="" placeholder="主机名或ip地址"
                       autocomplete="off" required>
            </div>
        </div>
        <div>
            <div>
                <input type="text" name="port" value="" placeholder="端口"
                       autocomplete="off" required>
            </div>
        </div>
        <div>
            <div>
                <input type="text" name="db" value="" placeholder="数据库"
                       autocomplete="off" required>
            </div>
        </div>
        <div>
            <div>
                <input type="text" name="username" value="" placeholder="用户名"
                       autocomplete="off" required>
            </div>
        </div>
        <div>
            <div>
                <input type="password" name="password" value="" placeholder="密   码"
                       autocomplete="off" required>
            </div>
        </div>
        <div>
            <button type="submit">登录</button>
        </div>
    </div>
</form>
</body>
</html>
